package com.ruoyi.task.sequence;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;


//@ComponentScan(basePackages = "com.ruoyi.task.sequence")
//@PropertySource("classpath:application-sched.properties")
//@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class, QuartzAutoConfiguration.class})
//@Configuration
//@SpringBootTest
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, QuartzAutoConfiguration.class})
public class App implements ApplicationRunner {
    public static void main(String[] args) {
        System.setProperty("spring.main.web-application-type", "none");
        System.setProperty("spring.main.allow-bean-definition-overriding", "true");
        SpringApplication.run(App.class, args);
    }

    @Autowired
    private FooBean applicaBean;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("applicationBean = " + applicaBean);
        new FooBean();
    }
}
